<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Login</title>
</h:head>
<h:body>
	<h:form>
		<p:panel header="Modification Form">
			<h:panelGrid columns="3" id="regGrid">
				<h:outputLabel for="firstName">New First name:</h:outputLabel>
				<p:inputText id="firstName" value="#{modifyUser.user.firstName}" />
				<p:message for="firstName" />

				<h:outputLabel for="lastName"> NewLast name:</h:outputLabel>
				<p:inputText id="lastName" value="#{modifyUser.user.lastName}" />
				<p:message for="lastName" />
 
				<h:outputLabel for="password">New Password:</h:outputLabel>
				<p:password id="password" value="#{modifyUser.user.password}"
					feedback="true" match="pwd2" label="Password"/>
				<p:message for="password" />

				<h:outputLabel for="pwd2">Confirm Password:</h:outputLabel>
				<p:password id="pwd2" label="Confirm Password" value="#{modifyUser.user.password}"/>
				
			</h:panelGrid>
			<p:commandButton value="Save Changes" update="regGrid"
				action="#{modifyUser.saveUserChanges()}" />

		</p:panel>
	</h:form>
	
	<h:form>
	<p:growl id="messages"/>  
  
    <p:splitButton value="Go To" actionListener="#{buttonBean.goTo}" update="messages" >  
        <p:menuitem value="Home Page" url="http://localhost:8080/TravelDreamWeb/registeredUser/index.xhtml?registeredUser=true" icon="ui-icon-extlink"/>  
        <p:separator />  
        <p:menuitem value="Search Page" url="http://localhost:8080/TravelDreamWeb/search.xhtml" icon="ui-icon-extlink"/>  
    </p:splitButton>  
  </h:form>
	
</h:body>
</html>